<?php
/**
 * Created by JetBrains PhpStorm.
 * User: SUshakov
 * Date: 15.05.12
 * Time: 13:44
 * To change this template use File | Settings | File Templates.
 */
class Helper
{
    /**
     * Загрузка файла helper'a
     * @param $param helper file name, without ext
     */
    static function load($param)
    {
        include("config.php");
        $ar_folders = array();
        $ar_folders[] = $config['APPPATH'] . "/helpers/";
        $ar_folders[] = $config['SYSPATH'] . "/helpers/";
        foreach ($ar_folders as $folder) {
            $file = strtolower($folder . $param . ".php");
            if (file_exists($file)) {
                include_once $file;
                break;
            }
        }
    }
}
